const formOption = {
    fieldOption: {
        realName: {
            selector: '#real-name',
            errorTip: '姓名不符合规范',
            successTip: '姓名OK了',
            reg: /^[\u4e00-\u9fa5]{2,6}/
        },
        addr: {
            selector: '#addr',
            errorTip: '你住在火星上吗？',
            successTip: '确定你是地球人了',
            reg: /\w{4,}/
        },
        email: {
            selector: '#email',
            errorTip: '邮箱错误',
            successTip: '邮箱OK了',
            reg: /^[A-Za-z0-9]\w+@\w{2,}\.[a-zA-Z]{2,4}/
        },
        pwd1:{
            selector: '#pwd',
            errorTip: '密码太弱鸡了',
            successTip: '你各家千万不要搞忘了',
            reg: /^\w{6,20}/
        }
    },
    formSelector: '#register',
    submitSelector: '#submit'
}
new ValiForm(formOption)